package com.moli.iov.base.init;

import com.moli.iov.base.remote.InitCacheRemoteService;
import com.moli.iov.base.service.IBaseCityService;
import com.moli.iov.base.service.ICompanyVehicleModelService;
import com.moli.iov.base.service.IDictDataService;
import com.moli.iov.base.service.ISysParamSettingsService;
import com.moli.iov.base.service.IVehicleAttentionService;
import com.moli.iov.base.service.IVehicleBaseService;
import com.moli.iov.base.service.IVehicleFenceBindingService;
import com.moli.iov.base.service.IVehicleFenceService;
import com.moli.iov.base.service.IVehicleTboxService;
import com.moli.iov.rest.RestResponse;
import javax.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 系统初始化缓存
 *
 * @author whl
 */
@Service
@Slf4j
public class InitService {

  private static final long serialVersionUID = 1L;
  @Autowired
  private InitCacheRemoteService  initCacheRemoteService;
  @PostConstruct
  public void init() {
    RestResponse restResponse = initCacheRemoteService.initCache();
    if (restResponse!=null&&restResponse.isFlag()){
      log.info("初始化iov-service-base:Redis缓存成功");
    }else{
      log.info("初始化iov-service-base:Redis缓存失败");
    }
  }
}
